tftp 服务器 ip |
您所在的位置:网站首页 › network stack driver support关闭 › tftp 服务器 ip |
![]() ●x86&PPC服务器PXE Boot及Wake on LAN(SLES)● 01 搭建前期准备工作需要的资源如下: 1、远程仓库:NFS,HTTP,FTP,或者是SMB,有效的网络连接 2、TFTP服务器 3、DHCP服务器,提供目标服务器静态IP地址 4、目标服务器支持PXE BOOT,网络服务,能从LAN唤醒,有效网络连接 5、控制服务器有效网络连接,最好跟目标服务器在同一网段内,SSH客户端 02 搭建远程NFS仓库1)使用root登陆控制服务器 2)创建安装源目录(包含安装文件,以SLES 11 SP3为例,可改成其他SLES 版本) # mkdir -p /install/11/sp3 # cd /install/11/sp3 3)挂载安装镜像 #mount /dev/sr0 /mnt 4)拷贝安装源文件 # cp -a /mnt .;mv mnt DVD1 5)安装NFS # zypper --non-interactive install nfs-kernel-server nfsidmap quota-nfs 6)共享安装源 # vim /etc/exports 写入以下内容: /install/11/sp3/DVD1 目标服务器IP地址(ro,root_squash,sync) 7)启动NFS,并设置开机启动 # /etc/init.d/nfsserver start;insserv /etc/init.d/nfsserver(SLES 11) # systemctl start nfsserver.serevice(SLES 12,15) 8)使用OpenSLP通告安装仓库(需要网络支持) # vim /etc/slp.reg.d/install.suse.nfs.reg 写入以下内容: # Register the NFS Installation Server service:install.suse:nfs://安装服务器的IP地址/install/11/sp3/DVD1,en,65535(注:要连续一行) description=NFS Repository 9)启动slpd服务,并设置开机启动 # rcslpd start;chkconfig slpd on(SLES 11) # systemctl start slpd.service;systemctl enable slpd.service(SLES 12,15) 10)测试NFS是否正常 # showmount -e localhost 03 搭建远程FTP仓库1)使用root登陆控制服务器 2)创建安装源目录(包含安装文件) # mkdir -p /install/11/sp3 3)挂载安装镜像 # mount /dev/sr0 /mnt # cd /install/11/sp3;cp -a /mnt .;mv mnt DVD1 4)安装vsftp # zypper --non-interactive install vsftpd 5)进入vsftp的根目录,创建安装源目录 # cd /srv/ftp/;mkdir sp3 6)绑定挂载安装源 # mount --bind /install/11/sp3/DVD1 /srv/ftp/sp3 7)启动vsftp服务并设置开机启动 # /etc/init.d/vsftpd start;chkconfigvsftpd on(SLES 11) # systemctl start vsftpd.service;systemctl enable vsftpd.service(SLES 12,15) 8)使用OpenSLP通告安装仓库(需要网络支持) # vim /etc/slp.reg.d/install.suse.ftp.reg 写入以下内容: # Register the FTP Installation Server service:install.suse:ftp://安装服务器的IP地址/install/11/sp3/DVD1,en,65535(注:要连续一行) description=FTP Repository 9)启动slpd服务,并设置开机启动 # rcslpd start;chkconfig slpd on(SLES 11) # systemctl start slpd.service;systemctl enable slpd.service(SLES 12,15) 10)测试vsftp是否正常(开启匿名登录) # vim /etc/vsftpd/vsftpd.conf anonymous_enable=YES # /etc/init.d/vsftpd reload 注:NFS和FTP二选一 04 搭建TFTP服务器1)使用root登陆控制服务器 2)安装tftp和xinetd # zypper --non-interactive install tftp xinetd 3)创建/srv/tftpboot和/srv/tftpboot/pxelinux.cfg文件夹 4)进入安装源的boot//loader目录,拷贝linux, initrd, message, biostest, 和memtest文件到/srv/tftpboot目录中 # cd /install/11/sp3/DVD1/boot//loader # cp -a linux initrd message biostestmemtest /srv/tftpboot 5)安装syslinux包 # zypper --non-interactive install syslinux 6)拷贝/usr/share/syslinux/pxelinux.0到/srv/tftpboot目录 # cp -a /usr/share/syslinux/pxelinux.0 /srv/tftpboot 7)拷贝isolinux.cfg文件到/srv/tftpboot/pxelinux.cfg/default # cd/install/11/sp3/DVD1/boot//loader # cp -a isolinux.cfg /srv/tftpboot/pxelinux.cfg/default 8)编辑/srv/tftpboot/pxelinux.cfg/default文件,去掉readinfo 和framebuffer开头的两行 9)在# install标签的append行末加上install=nfs://安装源仓库服务器地址/install/11/sp3/DVD1 netdevice=interface(参数以空格隔开) 注:interface为目标服务器使用的网卡,只在有多个网卡设备才需要定义(此步骤仅在需要安装操作系统的时候才需要,如果只需要启动到修复或救援模式,可省略) 10)编辑tftp服务文件 # chmod 755 /etc/xinetd.d/tftp # vim /etc/xinetd.d/tftp 写入以下内容: service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /srv/tftpboot disable = no } 11)重启xinetd服务 # rcxinetd restart(SLES 11) # systemctl restart xinetd(SLES 12,15) 05 搭建DHCP服务器1)使用root登陆控制服务器 2)安装dhcp # zypper --non-interactive install dhcp 3)编辑/etc/dhcpd.conf配置文件 # vim /etc/dhcpd.conf 写入以下内容: group { # PXE related stuff # # "next-server" defines theTFTP server that will be used next-server ip_tftp_server; # # "filename" specifies thepxelinux image on the TFTP server # the server runs in chroot under /srv/tftpboot filename "pxelinux.0"; host test{ hardware ethernet mac_address; fixed-address some_ip_address; } } 注:ip_tftp_server为tftp服务器的IP地址,test为目标服务器的主机名,mac_address为目标服务器的MAC地址,some_ip_address为目标服务器的指定静态IP地址 4) 重启dhcp服务 # rcdhcpd restart # systemctl restart dhcpd 06 目标服务器PXE BOOT1) 修改目标服务器BIOS启动选项包含PXE boot 2) 启动顺序不要设置PXE boot在硬盘启动之前 3) 启动选择PXE boot 直接重启目标服务器,选择网卡启动 通过远程操作指定目标服务器从网卡启动 开启网卡的网络唤醒功能 使用root登陆控制服务器 使用yast开启Wake on LAN # yast YaST > Network Services > WOL 选择Add,输入目标服务器的主机名和MAC地址 选择合适选项,单击Wakeup 07 总结从网卡启动后即可直接选择安装系统或者是进入修复或救援模式. 以上操作对x86_64及ppc_64均可,只需将安装源及文件换成对应的镜像文件. ![]() 温馨提示 感谢各位看官捧场,如果你喜欢本文,请分享转发到朋友圈。想要获得更多信息,请关注我。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |